package com.company.pk11;

public class TestDefaultBreakTryCatchFInally {
    public static void main(String[] args) {
        System.out.println("aaa");
//        testDefaultBreak(30);
        try {
            int i = testTryCatchFinally();
            System.out.println(i);
        } catch (Exception e) {
            System.out.println(e.getMessage()+" ...e out");
            e.printStackTrace();
        }
        System.out.println("finished");
    }

    private static int testTryCatchFinally() throws Exception {
        for (int i = 0; i <1 ; i++) {
            try {
                throw new Exception("exception thr");
            }catch (Exception e){
                throw e;
            }finally {
                continue;
            }
        }
        return 100;
    }

    private static void testDefaultBreak(int x){

        switch (x){
            default:
                System.out.println("default print...");
            case 10:
                System.out.println("in 10 case...");
                break;
            case 20:
                System.out.println("in 20 case...");
                break;
        }
    }
}
